package TwentyOne.Class.Define;

class Account {

    private String name;
    private double balance;

    public Account() {
    }

    public Account(String name, double balance) {
        this.name = name;
        this.balance = balance;
    }

    public String getInfo() {
        return "账户名称：" + this.name + "、余额：" + this.balance;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public String getName() {
        return this.name;
    }

    public double getBalance() {
        return this.balance;
    }
}

public class a5_Account {
    public static void main(String[] args) {
        Account account = new Account("哈哈", 900000.00);
        System.out.println(account.getInfo());
        System.out.println(account.getBalance());
    }
}
